//
//  Protocols.h
//  Utils
//
//  Created by enghou on 2018/4/13.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#ifndef Protocols_h
#define Protocols_h
#import <Foundation/Foundation.h>
@protocol TotalProtocol<NSObject>

@optional
-(void)delAItemWithId:(NSString *)item_id;

-(void)fetchArray:(NSArray *)array;

-(void)fetchModel:(id)model;
@end

@protocol ShowMedia<NSObject>

@optional

//显示图片
-(void)showImageWithImage:(NSArray *)image currentIndex:(NSInteger)idx sourceView:(UIImageView *)sourceView;

//播放视频
-(void)showVideoWithURL:(NSURL *)url;

//播放音频
-(void)showAudioWithURL:(NSURL *)url;

-(void)showFileWithURL:(NSURL *)url;

@end

@protocol AddAndEdit<NSObject>

@optional

//必须要有一个ID
@property(nonatomic,copy)NSString *ids;
//新增某个东西

@property(nonatomic,copy)NSString *orgId;

//获取详情
@property(nonatomic,copy)NSString *detailPath;
@property(nonatomic,strong,readonly)NSDictionary *detailParam;
@property(nonatomic,copy)void(^configView)(NSDictionary *);

//新增详情
@property(nonatomic,strong)NSDictionary *addedParameter;
@property(nonatomic,copy)NSString *addPath;

@property(nonatomic,copy,readonly)NSString *updatePath;
@property(nonatomic,strong,readonly)NSDictionary *updateParameter;

@property(nonatomic,copy,readonly)NSString *delPath;
@property(nonatomic,strong,readonly)NSDictionary *delParameter;

//更新，新增，删除成功后发送通知的名字
@property(nonatomic,copy)NSString *refresh_not_name;


//如果单纯提供一些参数不足以解决问题，则实现如下方法

-(void)addRecord;

-(void)updateRecord;

-(void)delRecord;

@end

#endif /* Protocols_h */
